 var basicMixin=require('../../../xc/mixins/basicMixin')
 var actclub_manager = require('../model/club_manage')
 //扩展团长管理
 basicMixin["afterlogin"]=function(options, config,userinfo){
  var that = this;
   var homeurl=config["basic"]["homeurl"]
  if(!userinfo||!userinfo.memberinfo){
   

      wx.redirectTo({
        url:homeurl
      })
    }
    actclub_manager.getactleadgroup().then(res=>{

      if(!res){
        wx.redirectTo({
          url: homeurl,
        })
      }else if(res.canuse==false){
        wx.redirectTo({
          url: homeurl,
        })
      }  else {
        if(that.afterclubinfo){
          that.afterclubinfo(options, config,userinfo,res)
        }

      }


    })

 }

 module.exports=basicMixin

   